#include<cstdlib>
#include<iostream>
using namespace std;

#define rounds 1000

int main()
{
    int Num_People=1000;

    int record_break_round=0;
    int record_break_whole=0;

    double previous=10,this_round=0;

    for(int i=0;i<rounds;i++)
    {
        previous=10,this_round=0;
        record_break_round=0;
        for(int j=0;j<Num_People;j++)
        {
            this_round=(rand()%100)*0.01+9;

            if(this_round<previous)
            {
                record_break_round++;
                previous=this_round;
                cout<<this_round<<' ';
            }
        }
        cout<<endl;
        record_break_whole+=(record_break_round-1);
    }

    cout<<record_break_whole*1.0/rounds;//4?
}
